#include "abacoismalia.h"
#include <GL/gl.h>
#include <GL/glu.h>
#include <gllib/Objects.h>

void AbacoIsmalia::draw()
{
    //Tampo de baixo

    glPushMatrix();
    glColor3f(0.6,0.4,0.2);
    glTranslatef(0.0, 0.15, 0.0);
    glScalef(1.5, 0.05, 0.3);
    gllibCube(0.4);
    glPopMatrix();

    //Tampo de cima

    glPushMatrix();
    glColor3f(0.6,0.4,0.2);
    glTranslatef(0.0, 0.5, 0.0);
    glScalef(1.5, 0.05, 0.3);
    gllibCube(0.4);
    glPopMatrix();

    //Tampo do lado esquerdo

    glPushMatrix();
    glColor3f(0.6,0.4,0.2);
    glTranslatef(-0.3, 0.325, 0.0);
    glRotatef(-90, 0.0, 0.0, 1.0);
    glScalef(0.92, 0.05, 0.3);
    gllibCube(0.4);
    glPopMatrix();

    //Tampo do lado direito

    glPushMatrix();
    glColor3f(0.6,0.4,0.2);
    glTranslatef(0.29, 0.325, 0.0);
    glRotatef(-90, 0.0, 0.0, 1.0);
    glScalef(0.92, 0.05, 0.3);
    gllibCube(0.4);
    glPopMatrix();

    //Cano 1

    glPushMatrix();
    glColor3f(0.5,0.5,0.5);
    glTranslatef(0.0, 0.325, 0.0);
    glScalef(1.0, 1.0, 1.0);
    gllibCylinder(0.00625, 0.35, 10.0);
    glPopMatrix();

    //Cano 2

    glPushMatrix();
    glColor3f(0.5,0.5,0.5);
    glTranslatef(-0.2, 0.325, 0.0);
    glScalef(1.0, 1.0, 1.0);
    gllibCylinder(0.00625, 0.35, 10.0);
    glPopMatrix();

    //Cano 3

    glPushMatrix();
    glColor3f(0.5,0.5,0.5);
    glTranslatef(0.2, 0.325, 0.0);
    glScalef(1.0, 1.0, 1.0);
    gllibCylinder(0.00625, 0.35, 10.0);
    glPopMatrix();

    //Cano 4

    glPushMatrix();
    glColor3f(0.5,0.5,0.5);
    glTranslatef(-0.1, 0.325, 0.0);
    glScalef(1.0, 1.0, 1.0);
    gllibCylinder(0.00625, 0.35, 10.0);
    glPopMatrix();

    //Cano 5

    glPushMatrix();
    glColor3f(0.5,0.5,0.5);
    glTranslatef(0.1, 0.325, 0.0);
    glScalef(1.0, 1.0, 1.0);
    gllibCylinder(0.00625, 0.35, 10.0);
    glPopMatrix();

    //Bolinha vermelha 1

    glPushMatrix();
    glColor3f(1.0,0.0,0.0);
    glTranslatef(0.1, 0.18, 0.0);
    glScalef(1.0, 1.0, 1.0);
    gllibSphere(0.02,10);
    glPopMatrix();

    //Bolinha vermelha 2

    glPushMatrix();
    glColor3f(1.0,0.0,0.0);
    glTranslatef(0.1, 0.22, 0.0);
    glScalef(1.0, 1.0, 1.0);
    gllibSphere(0.02,10);
    glPopMatrix();

    //Bolinha vermelha 3

    glPushMatrix();
    glColor3f(1.0,0.0,0.0);
    glTranslatef(0.1, 0.26, 0.0);
    glScalef(1.0, 1.0, 1.0);
    gllibSphere(0.02,10);
    glPopMatrix();

    //Bolinha vermelha 4

    glPushMatrix();
    glColor3f(1.0,0.0,0.0);
    glTranslatef(0.1, 0.3, 0.0);
    glScalef(1.0, 1.0, 1.0);
    gllibSphere(0.02,10);
    glPopMatrix();

    //Bolinha rosa 1

    glPushMatrix();
    glColor3f(1.0,0.0,0.5);
    glTranslatef(-0.1, 0.18, 0.0);
    glScalef(1.0, 1.0, 1.0);
    gllibSphere(0.02,10);
    glPopMatrix();

    //Bolinha rosa 2

    glPushMatrix();
    glColor3f(1.0,0.0,0.5);
    glTranslatef(-0.1, 0.22, 0.0);
    glScalef(1.0, 1.0, 1.0);
    gllibSphere(0.02,10);
    glPopMatrix();

    //Bolinha amarela 1

    glPushMatrix();
    glColor3f(1.0,1.0,0.0);
    glTranslatef(0.2, 0.18, 0.0);
    glScalef(1.0, 1.0, 1.0);
    gllibSphere(0.02,10);
    glPopMatrix();

    //Bolinha amarela 2

    glPushMatrix();
    glColor3f(1.0,1.0,0.0);
    glTranslatef(0.2, 0.22, 0.0);
    glScalef(1.0, 1.0, 1.0);
    gllibSphere(0.02,10);
    glPopMatrix();

    //Bolinha amarela 3

    glPushMatrix();
    glColor3f(1.0,1.0,0.0);
    glTranslatef(0.2, 0.26, 0.0);
    glScalef(1.0, 1.0, 1.0);
    gllibSphere(0.02,10);
    glPopMatrix();

    //Bolinha verde 1

    glPushMatrix();
    glColor3f(0.0,1.0,0.0);
    glTranslatef(-0.2, 0.18, 0.0);
    glScalef(1.0, 1.0, 1.0);
    gllibSphere(0.02,10);
    glPopMatrix();

    //Bolinha verde 2

    glPushMatrix();
    glColor3f(0.0,1.0,0.0);
    glTranslatef(-0.2, 0.22, 0.0);
    glScalef(1.0, 1.0, 1.0);
    gllibSphere(0.02,10);
    glPopMatrix();

    //Bolinha verde 3

    glPushMatrix();
    glColor3f(0.0,1.0,0.0);
    glTranslatef(-0.2, 0.26, 0.0);
    glScalef(1.0, 1.0, 1.0);
    gllibSphere(0.02,10);
    glPopMatrix();

    //Bolinha verde 4

    glPushMatrix();
    glColor3f(0.0,1.0,0.0);
    glTranslatef(-0.2, 0.3, 0.0);
    glScalef(1.0, 1.0, 1.0);
    gllibSphere(0.02,10);
    glPopMatrix();

    //Bolinha verde 5

    glPushMatrix();
    glColor3f(0.0,1.0,0.0);
    glTranslatef(-0.2, 0.34, 0.0);
    glScalef(1.0, 1.0, 1.0);
    gllibSphere(0.02,10);
    glPopMatrix();

    //Bolinha azul 1

    glPushMatrix();
    glColor3f(0.0,0.0,1.0);
    glTranslatef(0.0, 0.18, 0.0);
    glScalef(1.0, 1.0, 1.0);
    gllibSphere(0.02,10);
    glPopMatrix();

    //Bolinha azul 2

    glPushMatrix();
    glColor3f(0.0,0.0,1.0);
    glTranslatef(0.0, 0.22, 0.0);
    glScalef(1.0, 1.0, 1.0);
    gllibSphere(0.02,10);
    glPopMatrix();

    //Bolinha azul 3

    glPushMatrix();
    glColor3f(0.0,0.0,1.0);
    glTranslatef(0.0, 0.26, 0.0);
    glScalef(1.0, 1.0, 1.0);
    gllibSphere(0.02,10);
    glPopMatrix();
}
